
#if defined(_DEBUG)
#include <crtdbg.h>
#endif

#if defined(_WIN32) && defined(_WINDLL)
#include <Windows.h>

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID)
{
    switch (dwReason)
    {
    case DLL_PROCESS_ATTACH:
        break;
    case DLL_PROCESS_DETACH:
#if defined(_DEBUG)
        _CrtDumpMemoryLeaks();
#endif
        break;
    case DLL_THREAD_ATTACH:
        break;
    case DLL_THREAD_DETACH:
        break;
    }
    return TRUE;
}
#endif